package com.miao.shop.entity;

import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Objects;

/**
 * @author MiaoWenqing
 * @description: 购物车
 * @date 2021/2/16 22:10
 */
public class ShopCar {

    private String sId;
    private String sName;
    private HashSet<ShopCarProduct> productList;


    public String getsId() {
        return sId;
    }

    public void setsId(String sId) {
        this.sId = sId;
    }

    public String getsName() {
        return sName;
    }

    public void setsName(String sName) {
        this.sName = sName;
    }

    public HashSet<ShopCarProduct> getProductList() {
        return productList;
    }

    public void setProductList(HashSet<ShopCarProduct> productList) {
        this.productList = productList;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ShopCar shopCar = (ShopCar) o;
        return Objects.equals(sId, shopCar.sId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(sId);
    }

    @Override
    public String toString() {
        return "ShopCar{" +
                "sId='" + sId + '\'' +
                ", sName='" + sName + '\'' +
                ", productList=" + productList +
                '}';
    }
}
